import axios from "../../index.js";
// 年度演练计划列表
export const homePageListData = (data) => {
  return axios.request({
    url: "/plan_training/largeScreen/TrainDrillPlan",
    method: "get",
    data: data
  });
};

export const TrainDrillExecute = (data) => {
  return axios.request({
    url: "/plan_training/largeScreen/TrainDrillExecute",
    method: "get",
    data: data
  });
};
// 年度演练计划导入
export const upload = (data) => {
  return axios.request({
    url: "/plan_training/drillYearly/upload",
    method: "post",
    data: data
  });
};

// 年度演练计划列表
export const yearsPlanListPage = (data) => {
  return axios.request({
    url: "/plan_training/drillYearly/listPage",
    method: "post",
    data: data
  });
};

// 年度演练计划导入提交
export const yearSubmit = (data) => {
  return axios.request({
    url: "/plan_training/drillYearly/submit",
    method: "post",
    data: data
  });
};
// 年度演练计划查询
export const getYearList = (data) => {
  return axios.request({
    url: "/plan_training/drillYearly/list",
    method: "post",
    data: data
  });
};



// 月度演练计划列表
export const monthPlanListPage = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/listPage",
    method: "post",
    data: data
  });
};
// 月度演练计划编辑详情
export const getMonthById = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/edit",
    method: "get",
    data: data
  });
};
// 月度演练计划编辑保存
export const monthPlanDetailSave = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/save",
    method: "post",
    data: data
  });
};
// 月度演练计划编辑提交
export const monthPlanDetailSubmit = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/submit",
    method: "post",
    data: data
  });
};
// 月度演练计划编辑审批
export const monthPlanDetailApprove = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/approve",
    method: "post",
    data: data
  });
};
// 月度演练计划下发通知详情
export const getMonthXfDetail = (data) => {
  return axios.request({
    url: "/plan_training/drillNotice/getById",
    method: "get",
    data: data
  });
};
// 月度演练计划下发通知保存
export const monthPlanXfSave = (data) => {
  return axios.request({
    url: "/plan_training/drillNotice/save",
    method: "post",
    data: data
  });
};
// 月度演练计划下发通知提交
export const monthPlanXfSubmit = (data) => {
  return axios.request({
    url: "/plan_training/drillNotice/publish",
    method: "post",
    data: data
  });
};
// 月度演练计划下发通知审核
export const monthPlanXfApprove = (data) => {
  return axios.request({
    url: "/plan_training/drillNotice/approve",
    method: "post",
    data: data
  });
};
// 月度演练计划update
export const monthPlanXfUpdate = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/update",
    method: "post",
    data: data
  });
};

// 月度导出
export const monthExport = (data) => {
  return axios.request({
    url: "/plan_training/drillMonthly/export",
    method: "post",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};

// 选择人员下拉接口
export const getListUser = (data) => {
  return axios.request({
    url: "brac/account/listUser",
    method: "get",
    data: data
  });
};

// 人员选择详情
export const ryxzDetail = (data) => {
  return axios.request({
    url: "/plan_training/drillPerformance/getById",
    method: "get",
    data: data
  });
};
// 人员选择保存
export const ryxzSave = (data) => {
  return axios.request({
    url: "/plan_training/drillPerformance/save",
    method: "post",
    data: data
  });
};
// 人员选择提交
export const ryxzSbumit = (data) => {
  return axios.request({
    url: "/plan_training/drillPerformance/updById",
    method: "post",
    data: data
  });
};
// 人员选择审核
export const ryxzApproval = (data) => {
  return axios.request({
    url: "/plan_training/drillPerformance/approval",
    method: "post",
    data: data
  });
};



// 临时演练计划列表
export const temporaryPlanListPage = (data) => {
  return axios.request({
    url: "/plan_training/drillTemporary/listPage",
    method: "post",
    data: data
  });
};
// 临时演练计划详情
export const getLsDetail = (data) => {
  return axios.request({
    url: "/plan_training/drillTemporary/getById",
    method: "get",
    data: data
  });
};
// 临时演练计划保存
export const lsSave = (data) => {
  return axios.request({
    url: "/plan_training/drillTemporary/save",
    method: "post",
    data: data
  });
};
// 临时演练计划提交
export const lsSubmit = (data) => {
  return axios.request({
    url: "/plan_training/drillTemporary/submit",
    method: "post",
    data: data
  });
};
// 临时演练计划审批
export const lsApproval = (data) => {
  return axios.request({
    url: "/plan_training/drillTemporary/approve",
    method: "post",
    data: data
  });
};


// 队员选择列表
export const GetTeamMember = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/listPage",
    method: "post",
    data: data
  });
};

// 资源队员申请下拉字典 人员专业-memberMajor,人员性质-memberType, 人员资质-personnelQualification,,memberAbility-特种作战能力
export const selectQueryParam = (data) => {
  return axios.request({
    url: "/resource/baseResourceMember/selectQueryParam",
    method: "get",
    data: data
  });
};

// 模板下载
export const TemplateDownload = (data) => {
  return axios.request({
    url: "/plan_training/drillYearly/dowmload/model",
    method: "get",
    data: data,
    headers: { "Content-Type": "application/x-www-form-urlencoded" },
    responseType: "blob"
  });
};

// 根据演练计划id查询实际参演人员
export const getActuMembers = (data) => {
  return axios.request({
    url: "/plan_training/drillPerformance/getActuMembers",
    method: "get",
    data: data
  });
};
